In [24]:
import pandas as pd
import numpy as np
import altair as alt
alt.data_transformers.enable("vegafusion")
Out[24]:
DataTransformerRegistry.enable('vegafusion')
Grid Savers: Potential Benifits to Utilize V2G¶
Using a Vehicle to Grid (V2G) system, utilities can benifit from lower residential demands during peak hours, which cuts the cost of purchasing electricity in the wholesale power market. In this report, we are interested in simulating the implementastion of such technology.
Assumptions¶
We are assuming:
- The capacity of hardware, software, and regulation is supportive for this technology to implement
- The reduce in demand will not effect wholesale electricity pricing
Data¶
Local Marginal Price (LMP) of the Day Ahead Market (DAM) in CAISO on May 12nd.
In [25]:
df = pd.read_csv('data/512pre.csv')
df['INTERVALSTARTTIME'] = pd.to_datetime(df['INTERVALSTARTTIME'])
df['Hour_Label'] = df['INTERVALSTARTTIME'].dt.strftime('%H:%M') + '-' + (df['INTERVALSTARTTIME'] + pd.Timedelta(hours=1)).dt.strftime('%H:%M')
df.head()
Out[25]:
| OPR_DT | NODE | MW | INTERVALSTARTTIME | INTERVALENDTIME | Hour_Label | |
|---|---|---|---|---|---|---|
| 0 | 2025-05-12 | AFPR_1_TOT_GEN-APND | 42.62938 | 2025-05-12 00:00:00 | 2025-05-12 01:00:00 | 00:00-01:00 |
| 1 | 2025-05-12 | AFPR_1_TOT_GEN-APND | 40.00993 | 2025-05-12 01:00:00 | 2025-05-12 02:00:00 | 01:00-02:00 |
| 2 | 2025-05-12 | AFPR_1_TOT_GEN-APND | 37.27168 | 2025-05-12 02:00:00 | 2025-05-12 03:00:00 | 02:00-03:00 |
| 3 | 2025-05-12 | AFPR_1_TOT_GEN-APND | 37.20192 | 2025-05-12 03:00:00 | 2025-05-12 04:00:00 | 03:00-04:00 |
| 4 | 2025-05-12 | AFPR_1_TOT_GEN-APND | 39.59306 | 2025-05-12 04:00:00 | 2025-05-12 05:00:00 | 04:00-05:00 |
Below is a comprehensive overview of all California LMPs.
In [26]:
chart = alt.Chart(df).mark_line(interpolate='step-after').encode(
x=alt.X('INTERVALSTARTTIME:T', title='Time Interval'),
y=alt.Y('MW:Q', title='Price ($/MWh)'),
color='NODE:N',
tooltip=['NODE', 'Hour_Label', 'MW']
).properties(
title='Day-Ahead LMP ($/MWh) Over Time by Node',
width=800,
height=400
).interactive()
chart
Out[26]: